package com.yanmaohu.yulia.bean;

import java.util.List;

/**
 * @author Bright Lee
 */
public final class TargetSpecificationList {

    private int beginIndex;
    private int endIndex;
    private List<TargetSpecification> targetSpecificationList;

    public TargetSpecificationList(List<TargetSpecification> targetSpecificationList) {
        this.beginIndex = targetSpecificationList.get(0).getBeginIndex();
        this.endIndex = targetSpecificationList.get(targetSpecificationList.size() - 1).getEndIndex();
        this.targetSpecificationList = targetSpecificationList;
    }

    public int getBeginIndex() {
        return beginIndex;
    }

    public int getEndIndex() {
        return endIndex;
    }

    public int size() {
        return targetSpecificationList.size();
    }

    public TargetSpecification get(int index) {
        return targetSpecificationList.get(index);
    }

}
